OPENSC-EXPLORER(1) | OpenSC Tools | OPENSC-EXPLORER(1) |
NAME¶
opensc-explorer - generic interactive utility for accessing smart card and similar security token functions
SYNOPSIS¶
opensc-explorer [OPTIONS] [SCRIPT]
DESCRIPTION¶
The opensc-explorer utility can be used to perform miscellaneous operations such as exploring the contents of or sending arbitrary APDU commands to a smart card or similar security token.
If a SCRIPT is given, opensc-explorer runs in non-interactive mode, reading the commands from SCRIPT, one command per line. If no script is given, opensc-explorer runs in interactive mode, reading commands from standard input.
OPTIONS¶
The following are the command-line options for opensc-explorer. There are additional interactive commands available once it is running.
--card-driver driver, -c driver
--mf path, -m path
--reader arg, -r arg
--verbose, -v
--wait, -w
COMMANDS¶
opensc-explorer supports commands with arguments at its interactive prompt or in script files passed via the command line parameter SCRIPT.
Similar to a command shell like e.g. bash, each input line is split into white-space separated words. Of these words, the first one is used as the command, while the remaining ones are treated as arguments to that command.
The following commands are supported:
# ...
apdu data...
asn1 file-id
cat [file-id | sfi:short-id]
cd {.. | file-id | aid:DF-name}
change CHVpin-ref [[old-pin] new-pin]
old-pin and new-pin can be sequences of hexadecimal values, strings enclosed in double quotes ("..."), empty (""), or absent. If absent, the values are read from the card reader's pin pad.
Examples:
change CHV2 00:00:00:00:00:00 "foobar"
change CHV2 "foobar"
change CHV2
create file-id size
debug [level]
If level is omitted, show the current debug level.
delete file-id
do_get hex-tag [output]
If output is not given, the contents of hex-tag will be displayed as hex-dump.
do_put hex-tag data
data is either a sequence of hexadecimal values or a string enclosed in double quotes ("...").
echo string...
erase
get file-id [output]
If output is omitted, the name of the output file will be derived from the full card path to file-id.
help [pattern]
info [file-id]
ls [pattern...]
find [start-id [end-id]]
If not given, the default value for start-fid is 0000, while the default for end-fid is FFFF.
find_tags [start-tag [end-tag]]
If not given, the default value for start-tag is 0000, while the default for end-tag is FFFF.
mkdir file-id size
pin_info key-typekey-id
put file-id input
quit
random count [output-file]
rm file-id
unblock CHVpin-ref [puk [new-pin]]
puk and new-pin can be sequences of hexadecimal values, strings enclosed in double quotes ("..."), empty (""), or absent. If absent, the values are read from the card reader's pin pad.
Examples:
unblock CHV2 00:00:00:00:00:00 "foobar"
unblock CHV2 00:00:00:00:00:00 ""
unblock CHV2 "" "foobar"
unblock CHV2 00:00:00:00:00:00
unblock CHV2 ""
unblock CHV2
update_binary file-id offs data
data can be supplied as a sequence of hexadecimal values or as a string enclosed in double quotes ("...").
update_record file-id rec-nr rec-offs data
data can be supplied as a sequence of hexadecimal values or as a string enclosed in double quotes ("...").
verify key-typekey-id [key]
If key is omitted, the exact action depends on the card reader's features: if the card readers supports PIN input via a pin pad, then the PIN will be verified using the card reader's pin pad. If the card reader does not support PIN input, then the PIN will be asked interactively.
Examples:
verify CHV2 31:32:33:34:00:00:00:00
verify CHV1 "secret"
verify KEY2
sm {open | close}
SEE ALSO¶
AUTHORS¶
opensc-explorer was written by Juha Yrjölä <juha.yrjola@iki.fi>.
02/26/2024 | opensc |